import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class 除2 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int[] nums = new int[scan.nextInt()];
        int operation = scan.nextInt();
        scan.nextLine();

        for(int i = 0;i < nums.length;i ++){
            nums[i] = scan.nextInt();
        }
        for(int j = 0;j < operation;j ++){
            int num = 0;
            int max = 0;
            for(int i = 0;i < nums.length; i ++){
                if(nums[i] % 2 == 0 && nums[i] > max){
                    max = nums[i];
                    num = i;
                }
            }
            nums[num] /= 2;
        }
        int sum = 0;
        for(int x:nums){
            sum += x;
        }
        System.out.println(sum);
    }
}